package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * CgActivEtapa generated by hbm2java
 */
@Entity
@Table(name = "CG_ACTIV_ETAPA", schema = "UPET")
public class CgActivEtapa implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 9052011163201801081L;
	private CgActivEtapaId id;
	private CgActividad cgActividad;
	private CgEtapa cgEtapa;
	private String cusuario;
	private Date fhingreso;
	private Date fhmodificacion;
	private Integer bobligatoria;
	private Integer norden;

	public CgActivEtapa() {
	}

	public CgActivEtapa(CgActivEtapaId id, CgActividad cgActividad,
			CgEtapa cgEtapa, String cusuario, Date fhingreso,
			Date fhmodificacion, Integer bobligatoria) {
		this.id = id;
		this.cgActividad = cgActividad;
		this.cgEtapa = cgEtapa;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
		this.fhmodificacion = fhmodificacion;
		this.bobligatoria = bobligatoria;
	}

	public CgActivEtapa(CgActivEtapaId id, CgActividad cgActividad,
			CgEtapa cgEtapa, String cusuario, Date fhingreso,
			Date fhmodificacion, Integer bobligatoria, Integer norden) {
		this.id = id;
		this.cgActividad = cgActividad;
		this.cgEtapa = cgEtapa;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
		this.fhmodificacion = fhmodificacion;
		this.bobligatoria = bobligatoria;
		this.norden = norden;
	}

	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "cetapa", column = @Column(name = "C_ETAPA", nullable = false, precision = 5, scale = 0)),
			@AttributeOverride(name = "cactividad", column = @Column(name = "C_ACTIVIDAD", nullable = false, length = 3)) })
	public CgActivEtapaId getId() {
		return this.id;
	}

	public void setId(CgActivEtapaId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "C_ACTIVIDAD", nullable = false, insertable = false, updatable = false)
	public CgActividad getCgActividad() {
		return this.cgActividad;
	}

	public void setCgActividad(CgActividad cgActividad) {
		this.cgActividad = cgActividad;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "C_ETAPA", nullable = false, insertable = false, updatable = false)
	public CgEtapa getCgEtapa() {
		return this.cgEtapa;
	}

	public void setCgEtapa(CgEtapa cgEtapa) {
		this.cgEtapa = cgEtapa;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", nullable = false, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_MODIFICACION", nullable = false, length = 7)
	public Date getFhmodificacion() {
		return this.fhmodificacion;
	}

	public void setFhmodificacion(Date fhmodificacion) {
		this.fhmodificacion = fhmodificacion;
	}

	@Column(name = "B_OBLIGATORIA", nullable = false, precision = 1, scale = 0)
	public Integer getBobligatoria() {
		return this.bobligatoria;
	}

	public void setBobligatoria(Integer bobligatoria) {
		this.bobligatoria = bobligatoria;
	}

	@Column(name = "N_ORDEN", precision = 5, scale = 0)
	public Integer getNorden() {
		return this.norden;
	}

	public void setNorden(Integer norden) {
		this.norden = norden;
	}

}
